package cn.unknowpupil.domain.system;

import cn.unknowpupil.common.core.annotation.Excel;
import cn.unknowpupil.common.mybatis.base.SuperEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;


/**
 * Created at 2020-10-21 by  w10g <br>
 * Initialize SysDept  ... <br>
 *  部门表
 *
 * @author unknowpupil
 * @since 0.0.1
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_dept")
@ApiModel(value = "SysDept 域", description = "部门表")
public class SysDept extends SuperEntity<SysDept> {

private static final long serialVersionUID=1L;
    /**
     * 父部门id
     */
    @ApiModelProperty(value = "父部门id")
    @Excel(name = "父部门id")
    @TableField(value ="parent_id")
    private Long parentId;
    /**
     * 祖级列表
     */
    @ApiModelProperty(value = "祖级列表")
    @Excel(name = "祖级列表")
    @TableField(value ="ancestors")
    private String ancestors;
    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称")
    @Excel(name = "部门名称")
    @TableField(value ="dept_name")
    private String deptName;
    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    @Excel(name = "显示顺序")
    @TableField(value ="order_num")
    private Integer orderNum;
    /**
     * 负责人
     */
    @ApiModelProperty(value = "负责人")
    @Excel(name = "负责人")
    @TableField(value ="leader")
    private String leader;
    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @Excel(name = "联系电话")
    @TableField(value ="phone")
    private String phone;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Excel(name = "邮箱")
    @TableField(value ="email")
    private String email;

    /** 子部门 */
    @ApiModelProperty(value = "子部门")
    @TableField(exist = false)
    private List<SysDept> children = new ArrayList<SysDept>();
}